Naïve Gaussian elimination in matrix notation
Naïve Gaussian elimination can be implemented using matrix notation in the following way. Consider our system of peaches, apples and bananas.
Rewrite this with only the numerical values as
Subtract 2 times row one from row two. Replace row two with the new values.
Subtract 3 times row one from row three. Replace row three with the new values.
Subtract 2 times row two from row three and replace row three with the new values.
This matrix is now in upper triangular form and we can easily back substitute to solve for b, then a and then p.